<template>
  <div>
    <button @click="fun()">点我传给父组件</button>
    <slot name="xt"></slot>
    
  </div>
</template>

<script>
export default {
  data() {
    return {
      zitext: "哈哈，我是子组件",
    };
  },
  methods: {
    fun() {
      this.$emit("chuan", this.zitext);
    },
  },
};
</script>

<style>
</style>